

public class TestJdkProxy {

    public static void main(String[] args) {

        Travel travel = (Travel) new JdkTravelAgency().getInstance(new JdkTravelPerson());
        travel.buyTrainticket();
    }
}